package com.ruoyi.system.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.DevStatusBLong;
import com.ruoyi.system.service.DevStatusBLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 设备历史数据
 */
@RestController
@RequestMapping("/log")
public class DevStatusBLogController extends BaseController {
    @Autowired
    private DevStatusBLogService devStatusBLogService;

    /**
     * 查询最近一周数据
     * @return
     */
    @GetMapping("/Listdata")
    public TableDataInfo Listdata(Integer DevID,Integer ParaType,Integer ParaNo1,Integer day){
        List<DevStatusBLong>list=devStatusBLogService.ListWater(DevID,ParaType,ParaNo1,day);
        return getDataTable(list);
    }
}
